// router的配置文件
import { createRouter, createWebHistory } from "vue-router";
export const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      name: "home",
      component: () => import("../views/HomePage.vue"),
    },
    {
      path: "/category",
      name: "category",
      component: () => import("../views/CategoryPage.vue"),
    },
    {
      path: "/borrowing",
      name: "borrowing",
      component: () => import("../views/BorrowRecords.vue"),
    },
    {
      path: "/collection",
      name: "collection",
      component: () => import("../views/FavoriteRecords.vue"),
    },
    {
      path: "/personal",
      name: "personal",
      component: () => import("../views/UserDashboard.vue"),
    },
    {
      path: "/details/:id",
      name: "details",
      component: () => import("../views/BookDetails.vue"),
    },
    {
      path: "/search",
      name: "search",
      component: () => import("../views/SearchResults.vue"),
    },
  ],
});
